<template>
  <VanCheckbox class="agree-check">
    <span>
      已同意《
      <BaseText is-primary @click.stop="onGoUserAgree">用户服务协议</BaseText>
      》 ,《
      <BaseText is-primary @click.stop="onGoSecretAgree">隐私协议</BaseText>
      》
    </span>
  </VanCheckbox>
</template>

<script setup>
import { useRouter } from "vue-router";

const router = useRouter();
const onGoSecretAgree = () => {
  router.push({
    name: "secretAgree",
  });
};

const onGoUserAgree = () => {
  router.push({
    name: "userAgree",
  });
};
</script>

<style lang="scss" scoped>
.agree-check {
  margin: var(--dx-gap-xs) 0;
}
::v-deep(.van-checkbox__icon) {
  font-size: var(--dx-text-size-sm);
}
</style>
